package com.lee.blepwm.utils;

import com.blankj.utilcode.util.ConvertUtils;

import org.junit.Test;

import java.math.BigInteger;

/**
 * declaration:
 * time:
 */
public class HexUtils {

    /**
     * 差值
     *
     * @param str1 十六进制
     * @param str2
     * @return
     */
    public static int length(String str1, String str2) {
        BigInteger b1 = new BigInteger(str1, 16);
        BigInteger b2 = new BigInteger(str2, 16);
        return b2.intValue() - b1.intValue();
    }

    @Test
    public void test() {
        int length = length("0b", "12");
        System.out.println(length);
    }
}
